/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package containerlogistik.implementation;

import containerlogistik.interfaces.StowageLocation;

public class LocInStowage implements StowageLocation {
    
    private final int bay;
    private final int row;
    private final int tier;
    
    private LocInStowage(int bay, int row, int tier) {
        this.bay = bay;
        this.row = row;
        this.tier = tier;
    }
    
    static StowageLocation valueOf(int bay, int row, int tier) {
        return new LocInStowage(bay, row, tier);
    }

    @Override
    public int bay() {
        return this.bay;
    }

    @Override
    public int row() {
        return this.row;
    }

    @Override
    public int tier() {
        return this.tier;
    }

    @Override
    public int capacity() {
        return this.bay() * this.row() * this.tier();
    }

    @Override
    public boolean isNull() {
        return false;
    }
    
}
